<?php
/**
 * @author @author Samrat Khan & Sadik Sarfaraz - Apr 13, 2013
 */
    require('top.inc.php');
?>
<?php
if(isset($_SESSION['user']) && $_SESSION['user']['utype'] == 1 || $_SESSION['user']['utype'] == 2) {
    $rows = selectAll(ASC, "employeename", "employee", $db);
    echo "<h5>Employee Information</h5>";
    echo "<table id=\"load\" class=\"row-fluid table table-striped table-bordered\">";
            echo "<tr>";
                echo "<th>";
                    echo $employee['employeename'];
                echo "</th>";
                echo "<th>";
                    echo $employee['employeecell'];
                echo "</th>";
                echo "<th>";
                    echo $employee['designation'];
                echo "</th>";
                echo "<th>";
                    echo $employee['warehouse_id'];
                echo "</th>";
                echo "<th>";
                    echo $employee['inserteddate'];
                echo "</th>";
                echo "<th>";
                    echo $optionsIcons['optionIcon'];
                echo "</th>";
            echo "</tr>";
            
        foreach ($rows as $row) {
            echo "<tr>";
                echo "<td>";
                    echo $row['employeename'];
                echo "</td>";
                echo "<td>";
                    echo $row['employeecell'];
                echo "</td>";
                echo "<td>";
                    echo $row['designation'];
                echo "</td>";
                echo "<td>";
                    echo getWarehouse($row['warehouse_id'], $db);
                echo "</td>";
                echo "<td>";
                    echo $row['inserteddate'];
                echo "</td>";
                echo "<th>";
                    echo "<a class='btn btn-mini' href='javascript:void(0)' onclick='employee(".$row['employee_id'].")'>".$optionsIcons['delete']."</a>
                          <a class='btn btn-mini' href='javascript:void(0)' onclick='employeemodify(".$row['employee_id'].")'>".$optionsIcons['update']."</a>
                        ";
                echo "</th>";
            echo "</tr>";
        }
    echo "<table>";
} else {
    header("Location: login.php");
}
?>

<?php
    include ('bottom.inc.php');
    //href='ajax.php?action=".asjkdlfa."&erase=".$row['bearer_id']."&emanlbt=".bearer."
?>